<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
	<th:block th:include="include :: header('新增奖励')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-fantasyReward-add">
			<div class="form-group">	
				<label class="col-sm-3 control-label">奖励类型：</label>
				<div class="col-sm-8">
					<select class="form-control" name="type" th:with="type=${@dict.getType('fantasy_reward_type')}">
						<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
					</select>
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">奖励内容：</label>
				<div class="col-sm-8">
					<select id="value" name="value" class="form-control">
						<option value="100">100经验</option>
						<option value="100">100金钱</option>
						<option th:each="fantasyItemType:${fantasyItemTypeList}" th:alt-title="${fantasyItemType.itemDesc}"
								th:value="${fantasyItemType.id}" th:text="${fantasyItemType.name}" value="1">
							aaa
						</option>
					</select>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">奖励变动值：</label>
				<div class="col-sm-8">
					<input id="count" name="count" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">备注信息：</label>
				<div class="col-sm-8">
					<input id="remark" name="remark" class="form-control" type="text">
				</div>
			</div>
		</form>
	</div>
    <div th:include="include::footer"></div>
    <script type="text/javascript">
		var prefix = ctx + "fantasy/fantasyReward"
		$("#form-fantasyReward-add").validate({
			rules:{
				xxxx:{
					required:true,
				},
			},
			focusCleanup: true
		});
		
		function submitHandler() {
	        if ($.validate.form()) {
	            $.operate.save(prefix + "/add", $('#form-fantasyReward-add').serialize());
	        }
	    }
	</script>
</body>
</html>
